﻿using System;
using Examples.Asset.Protocol;
using HK.Core.Common.Data;
using HK.Core.Serializable.Attribute;
using HK.Core.Serializable.Data;
using HK.Core.Serializable.Protocol.Attribute;
using UnityEngine;

namespace Examples.Asset.Data
{
    [Serializable]
    public class TestChild2 : JsonData<TestChild1>
    {
        [SerializeField, GenericField("Element字符串1")]
        private string ElementStr1 = null;
        
        [SerializeField, GenericField("Element字符串2")]
        private string ElementStr2 = null;
        
        [SerializeField, GenericField("Element字符串3")]
        private string ElementStr3 = null;
        
        [SerializeField, DateTime("创建日期1")]
        private long createTime1 = 0L;
        
        [SerializeField, PathBrowse("输出目录2", PathBrowseMode.Directory)]
        private string outputDir2 = null;
    }
    
    [Serializable]
    public class TestChild1 : JsonData<TestChild1>
    {
        [SerializeField, GenericField("Element字符串1")]
        private string ElementStr1 = null;
        
        [SerializeField, GenericField("Element字符串2")]
        private string ElementStr2 = null;
        
        [SerializeField, GenericField("Element字符串3")]
        private string ElementStr3 = null;

        [SerializeField, GroupView("测试Child2")]
        private TestChild2 Child2 = new TestChild2();
        
        [SerializeField, DateTime("创建日期1")]
        private long createTime1 = 0L;
        
        [SerializeField, PathBrowse("输出目录2", PathBrowseMode.Directory)]
        private string outputDir2 = null;
    }
    
    [Serializable]
    public class TestElement1 : JsonData<TestElement1>
    {
        [SerializeField, GenericField("Element字符串1")]
        private string ElementStr1 = null;
        
        [SerializeField, GenericField("Element字符串2")]
        private string ElementStr2 = null;

        [SerializeField, GroupView("测试Child1")]
        private TestChild1 child1 = new TestChild1();
        
        [SerializeField, GenericField("Element字符串3")]
        private string ElementStr3 = null;
        
        [SerializeField, DateTime("创建日期1")]
        private long createTime1 = 0L;

        [SerializeField, GroupView("测试Child2")]
        private TestChild1 child2 = new TestChild1();
        
        [SerializeField, PathBrowse("输出目录2", PathBrowseMode.Directory)]
        private string outputDir2 = null;
    }
    
    [Serializable]
    public class TestAssetData : SAssetData, ITestAssetData
    {
        [SerializeField, GenericField("字符串1")]
        private string testStr1 = null;
        
        [SerializeField, GenericField("字符串2")]
        private string testStr2 = null;
        
        [SerializeField, GroupView("测试Group1")]
        private TestElement1 element1 = new TestElement1();
        
        [SerializeField, GenericField("字符串3")]
        private string testStr3 = null;
        
        [SerializeField, GenericField("字符串4")]
        private string testStr4 = null;
        
        [SerializeField, GroupView("测试Group2")]
        private TestElement1 element2 = new TestElement1();
        
        [SerializeField, DateTime("创建日期1")]
        private long createTime1 = 0L;
        
        [SerializeField, GenericField("字符串5")]
        private string testStr5 = null;
        
        [SerializeField, GenericField("字符串6")]
        private string testStr6 = null;
        
        [SerializeField, PathBrowse("输出目录1", PathBrowseMode.Directory)]
        private string outputDir1 = null;
        
        [SerializeField, GenericField("字符串7")]
        private string testStr7 = null;
        
        [SerializeField, GenericField("字符串8")]
        private string testStr8 = null;
        
        [SerializeField, GenericField("字符串9")]
        private string testStr9 = null;
        
        [SerializeField, DateTime("创建日期2")]
        private long createTime2 = 0L;
        
        [SerializeField, PathBrowse("输出目录2", PathBrowseMode.Directory)]
        private string outputDir2 = null;
    }
}
